set_group(get_dir_basename(os.curdir()))
set_default(false)

add_requires("pkgconfig::gtest_main", {alias = "gtest_main"})
-- add_requires("pkgconfig::gmock_main", {alias = "gmock_main"})

local function build_case(filename, packs)
    base_name = path.basename(filename)
    -- prefix = get_dir_basename(os.curdir()) .. '_'
    -- target_name = prefix .. base_name
    target(base_name)
        set_kind('binary')
        set_default('false')
        add_files(filename)
        add_packages('gtest_main')
    target_end()
end

for _, file in ipairs(os.files('*.cpp')) do
    build_case(file)
end
